feat(us3): implement users-api operational contract - #21
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Users API now exposes distinct public startup, readiness, and liveness groups,
propagates safe request correlation into responses and logs, uses the
OpenTelemetry Micrometer bridge with Zipkin export, rejects malformed signed
JWTs as 401 responses, emits service and HTTP metrics, and loads only non-secret
default-off operational configuration. Unused generated form-login credentials
and detailed health output are disabled.
Why
The service previously exposed aggregate health details, used Brave rather than
the required OpenTelemetry bridge, had no correlation contract, and allowed a
malformed signed JWT payload to escape the filter as a server error. It also
enabled Spring's unused generated password, which placed credential material in
startup logs.
The first failing test commit (
42b22c8) is already onmainand currentlymakes its CI red; this PR supplies the implementation that the test-first commit
specified and records that base-branch condition explicitly.
Tasks
specs/009-full-platform-rolloutT076specs/009-full-platform-rolloutT081microservice-app-gitopsPR because the authoritative register is not in this repository.Paired changes: MicroTodoSuite/microservice-app-frontend#21 and
MicroTodoSuite/microservice-app-gitops#85.
How it is verified
42b22c8failed compilation becauseOperationalPropertiesand the OpenTelemetry API were absent.ae74775added the malformed-signed-JWT regression while implementation files remained unstaged, preserving the red test-first state.mvn -B -ntp clean verify—Tests run: 13, Failures: 0, Errors: 0, Skipped: 0;BUILD SUCCESS.npx --yes @stoplight/spectral-cli@6 lint contracts/openapi.yaml --ruleset .spectral.yaml— no errors or warnings.docker build --progress=plain -t microtodosuite/users-api-us3:local .— image build completed and repeated all 13 tests under Java 21.UPresponses from/health/startup,/health/readiness, and/health/liveness, echoedX-Request-Id, logged only the default-off operational object, and contained neither the supplied JWT secret nor a generated Spring password in logs.The full stack conformance run was not executed locally; PR CI remains the
blocking integration and supply-chain check.
Risk and rollback
The tracing bridge change can affect span export, and the readiness group now
depends on H2. Runtime and context tests exercise both. Rollback is to revert
this PR's merge commit; no data or infrastructure migration is included.
What this PR does not do
It does not change GitOps probes or overlays, deploy the image, activate a
full-profile cluster, or suppress any existing dependency/security finding.